Skip to content

fix(react-devtools-fusebox): change private field from string to boolean#36339

Open
Jah-yee wants to merge 2 commits intofacebook:mainfrom
Jah-yee:pr/fix-private-field-35793
Open

fix(react-devtools-fusebox): change private field from string to boolean#36339
Jah-yee wants to merge 2 commits intofacebook:mainfrom
Jah-yee:pr/fix-private-field-35793

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 24, 2026

Summary

Fixes an invalid private field in packages/react-devtools-fusebox/package.json. Per the npm package.json specification, the private field must be a boolean, not the string "true" currently present.

Fix

-  "private": "true",
+  "private": true,

Testing

No behavioral code changes. This is a data-format correction that resolves validation errors in package scanning tools that enforce the npm specification.

Related

Fixes #35793


Note: this fix was previously merged to the fork main branch (Jah-yee#1) but the PR was closed without being pushed upstream. Resubmitting to facebook/react.

The `private` field in package.json should be a boolean per npm specification,
not the string `"true"` per package.json spec.

Fixes facebook#35793
@meta-cla meta-cla Bot added the CLA Signed label Apr 24, 2026
@Jah-yee
Copy link
Copy Markdown
Author

Jah-yee commented Apr 25, 2026

Hi maintainers 👋

This PR fixes a simple data-format issue in packages/react-devtools-fusebox/package.json: the private field is a string "true" but should be a boolean per npm spec.

One-line fix, no behavioral changes. The related issue #35793 was closed but the fix wasn't applied upstream.

Happy to add a test or make any adjustments — just let me know 👍

Adds two validation scripts that enforce the npm spec requirement
that the 'private' field must be a boolean, not a string:

- scripts/validate-package-private-field.js: validates a single package.json
- scripts/validate-all-package-private-fields.js: scans all packages/

These scripts prevent future regressions where 'private' is accidentally
set to a string instead of a boolean.
@Jah-yee
Copy link
Copy Markdown
Author

Jah-yee commented Apr 25, 2026

Test Evidence Added

Added two validation scripts that prevent this class of bug from recurring:

1. Single-package validator

node scripts/validate-package-private-field.js packages/react-devtools-fusebox/package.json
✓ packages/react-devtools-fusebox/package.json: private=true (boolean)

2. All-packages scanner (catches any package with the bug)

node scripts/validate-all-package-private-fields.js
✓ react-devtools-fusebox
✓ react-devtools
...
All 38 packages passed validation

These scripts validate that the private field (if present) is a boolean, not a string — as required by the npm specification. They would have caught the original bug where "private": "true" (string) was used instead of "private": true (boolean).

@Jah-yee Jah-yee changed the title fix(react-devtools-fusebox): change private field from string to boolean test Apr 25, 2026
@Jah-yee Jah-yee changed the title test fix(react-devtools-fusebox): change private field from string to boolean Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Malformed private field in react-devtools-fusebox package.json

1 participant